<!doctype html>
<html lang="zh-cn">
<head>
    <title>川信职院贴吧</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,scale=1.0">
    <link rel="shortcut icon" href="../static/img/favicon.png">
    <link rel="stylesheet" href="../static/css/bootstrap.min.css" >
    <link rel="stylesheet" href="../static/css/index.css">
	<link rel="stylesheet" href="../static/kindeditor/themes/default/default.css" >
    <script src="../static/js/jquery-1.10.1.min.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    {{if .show}}
    {{if eq .show 1}}
    <script src="../static/js/login.js"></script>
    {{end}}
    {{end}}
</head>
<body>
<div id="wrap">
        
    {{template "header.html" .}}
    <!--/.header-->

    <section class="container pagecontents">
        <div class="row">
            <div class="page-list col-xs-12 col-sm-9">
                <div class="page-header">
                    <h4>{{.bbs.BBSTitle}}</h4>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <span class="text-info">回复列表</span>
                        <span class="badge pull-right">共{{.count}}条回复</span>
                    </div>
                    <div class="panel-body">
                       
                    </div>

                    <!-- List group -->
                    <ul class="list-group">
                        <li class="list-group-item">
                            <div class="media">
                                <a class="pull-left" href="#">
                                    <img class="media-object thumbnail" 
                                    src="{{.bbs.AddAuthor.PicUrl}}"
                                     alt="..." >
                                </a>
                                <div class="media-body">
                                    <p class="media-heading">
                                        <span class=""><a href="">{{.bbs.AddAuthor.UserName}}</a></span>
                                        <span class="pull-right">
                                            {{date .bbs.AddTime "Y-m-d H:i:s"}}
                                            <span class="label label-info">楼主</span>
                                        </span>
                                    </p>
                                    <br />
                                    <p>
                                        {{str2html .bbs.BBSContent}}
                                    </p>
                                </div>
                            </div>
                        </li>

                        {{range $index, $res := .responses}}
                        <li class="list-group-item">
                            <div class="media">
                                <a class="pull-left" href="#">
                                    <img class="media-object thumbnail" 
                                        src="../{{$res.AddAuthor.PicUrl}}" alt="...">
                                </a>
                                <div class="media-body">
                                    <p class="media-heading">
                                        <span><a href="">【{{$res.AddAuthor.UserName}}】</a></span>
                                        <span class="pull-right">
                                            {{date $res.AddTime "Y-m-d H:i:s"}}
                                            <span class="label label-info">
                                                {{$index | Index}}楼</span>
                                        </span>
                                    </p>
                                    <br />
                                    <p>
                                       {{str2html $res.Content}}
                                    </p>
                                </div>
                            </div>
                        </li>
                        {{end}}

                    </ul>
                </div>
				<!------kindeditor------>
                <form action="/response" method="post">
                <div>
					<textarea id="content" name="content" style="width:100%;height:220px;visibility:hidden;">
						请在此填写回复内容...
					</textarea>
                    <input type="hidden" name="id" value="{{.id}}" >
					<br />
					<input type="submit" class="btn btn-primary" value="回复帖子" >
                </div>
                </form>
				<!--/kindeditor-->
            </div>


            <div class="col-xs-6 col-sm-3">
				<br /><br /><br />
				<div class="container text-center">
					<img src="http://chart.apis.google.com/chart?chs=250x280&cht=qr&choe=UTF-8&chl=123" >
					<div>手机访问请扫描</span>
				</div>
            </div>
        </div>
    </section>


</div><!--/.wrap-->

<footer id="footer">
    <div class="container">
        <p class="text-muted">&copy; Dowish.net　2014</p>
    </div>
</footer>

<!-- login Modal -->
{{template "footer.html" .}}
<!-- /.modal -->

<!--可以放在head部分，先加载-->
<script src="../static/kindeditor/kindeditor-min.js"></script>
<script src="../static/kindeditor/lang/zh_CN.js"></script>
<script src="../static/kindeditor/kindeditor-init.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
</html>